import request from '@/utils/request'

//创建相册
export function createAlbum(params) {
  return request({
    url: '/album/create',
    method: 'post',
    params: params
  })
}

// 获取相册列表
export function getAlbums() {
  return request({
    url: '/album/info',
    method: 'get'
  })
}

// 删除相册
export function deleteAlbum(params) {
  return request({
    url: '/album',
    method: 'delete',
    params: params
  })
}

// 相册重命名
export function renameAlbum(params) {
  return request({
    url: '/album/rename',
    method: 'post',
    params: params
  })
}

// 获取上传封面图片token
export function getUploadToken() {
  return request({
    url: '/album/upload_token',
    method: 'get'
  })
}

// 设置相册封面图片
export function setAlbumCoverUrl(params) {
  return request({
    url: '/album/cover_url',
    method: 'put',
    params: params
  })
}
